#include "Camera.h"


Camera::Camera(const Vector3f& eye, const Vector3f& target, const Vector3f& up):
	eye(eye),
	target(target),
	up(up){
	forward = target - eye;
	forward.NormalizeSelf();
}

void Camera::UpdateProjMatrix()
{
	projMat.SetPerspective(fovy, aspect, near, far);
}

void Camera::UpdateViewMatrix()
{
	viewMat = Matrix4x4f::LookAt(eye, target, up);
	forward = target - eye;
	forward.NormalizeSelf();
}
